<div class="main-body">
  <div class="form-area">
    <form class="form-horizontal" role="form" [formGroup]="loginForm" (ngSubmit)="onSubmit(loginForm.value)">
      <div class="form-group">
        <label for="username" class="col-sm-3 control-label ">用户名:</label>
        <div class="col-sm-9">
          <input type="text" id="username" class="form-control" required formControlName="username">
 <!--         <div [hidden]="true||loginForm.controls.username.valid||loginForm.controls.username.pristine">
            <p *ngIf="loginForm.controls.username.errors?.required">必须输入用户名</p>
          </div>-->
        </div>
      </div>
      <div class="form-group">
        <label for="password" class="col-sm-3 control-label">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
        <div class="col-sm-9">
          <input type="password" id="password" class="form-control" required formControlName="password">
<!--          <div [hidden]="loginForm.controls.password.valid||loginForm.controls.password.pristine">
            <p *ngIf="loginForm.controls.password.errors?.required">必须输入密码</p>
          </div>-->
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-9 col-md-offset-3">
          <button type="submit" class="btn btn-block btn-primary" [disabled]="!loginForm.valid">登录</button>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-12 bottom-links">
          <ul>
            <li><a (click)="setHome()">设为首页</a></li>
            <li>|</li>
            <li><a (click)="addFavorite()">加入收藏</a></li>
            <li>|</li>
            <li><a (click)="help()">系统助手</a></li>
          </ul>
        </div>
      </div>


    </form>
  </div>

</div>
